<?php
/**
	Sponsor Manager (init.php file)
    Copyright (C) <Fri Feb 08 21:38:05 CET 2008>  Marcos Ramírez <marcosramirez@gmail.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

    Purpose: Class, and other needed routines initialization file.
    Last Modified:     
  
 **/

// Development only, comment/delete next line for production.
//error_reporting(E_ALL);


@(include './config.php') OR die (_('Fatal error, config.php missed'));
@(include './libs/session.php') OR die (_('Fatal error, session.php missed'));

// Classess init.
(include './libs/class.sections.php') OR die (_('Fatal error, class.sections.php missed'));
(include './libs/class.users.php') OR die (_('Fatal error, class.userss.php missed'));
(include './libs/class.domains.php') OR die (_('Fatal error, class.domains.php missed'));
(include './libs/class.db.php') OR die (_('Fatal error, class.db.php missed'));
(include './libs/class.categories.php') OR die (_('Fatal error, class.categories.php missed'));
(include './libs/class.sponsors.php') OR die (_('Fatal error, class.sponsors.php missed'));
(include './libs/common.class.php') OR die (_('Fatal error, common.class.php missed'));
(include './libs/class.promotionalcontent.php') OR die (_('Fatal error, class.promotionalcontent.php missed'));
(include './templates/'.$Cfg['Sys']['defaultTemplate'].'/html.php') OR die (_('Fatal error, html.php missed'));

// Classes objects init.
$user=new Users();
//$db=new DB($Cfg['DB']['dbname']); // Marcos: Now Common extends DB (Note; Anyone knows why ZendStudio doesn't show methods for class.db.php?)
$sm=new Common($Cfg['DB']['dbname']);
$db=new DB($Cfg['DB']['dbname']);
$html=new HTML;
$cat=new Categories();
$sponsors=new Sponsors();
$promos=new PromotionalContent();
$domains=new domains();

//End of Classes init.


// Gettext init - REMEMBER YOUR LOCALE INSTALATION MUST SUPPORT THE LANGUAGE YOU WANT TO SHOW!

$lang=$Cfg['Sys']['defaultlanguage'];
$lang='es_ES.euro';

setlocale(LC_MESSAGES, $lang);
bindtextdomain('messages', $Cfg['Sys']['translationsdir']);
textdomain('messages');

// Definitions

define(version, '0.1');


?>